package com.AJava1710D.bingfabao.condition.TTT;

/**
 * 作者: LCG
 * 日期: 2020/6/24 08:58
 * 描述:
 */
public class TestThreadUtils {

    private Object object;

    public TestThreadUtils(Object object) {
        this.object = object;
    }


    public void waitA() throws InterruptedException {

        synchronized (object){
            object.wait();
        }

    }

    public void tongZhiA(){

        synchronized (object){
            object.notify();
        }
    }


    public void waitB() throws InterruptedException {

        synchronized (object){
            object.wait();
        }

    }

    public void tongZhiB(){

        synchronized (object){
            object.notify();
        }
    }


}
